package org.xdoclet.plugin.hibernate;

import java.util.HashMap;
import java.util.Map;

import org.generama.FreeMarkerTemplateEngine;
import org.generama.QDoxCapableMetadataProvider;
import org.generama.WriterMapper;
import org.generama.defaults.XMLOutputValidator;
import org.xdoclet.plugin.hibernate.qtags.TagLibrary;

import freemarker.ext.beans.BeansWrapper;

public class ValidationPlugin extends AbstractHibernateFreemarkerPlugin {

	public ValidationPlugin(FreeMarkerTemplateEngine freemarkerTemplateEngine,
			QDoxCapableMetadataProvider metadataProvider,
			WriterMapper writerMapper) {
		super(freemarkerTemplateEngine, metadataProvider, writerMapper);
        setFileregex("\\.java");
        setFilereplace("\\-validation.xml");
        setMultioutput(true);
//        Map dtds = new HashMap();
//        dtds.put("http://www.opensymphony.com/xwork/xwork-validator-1.0.2.dtd",
//                getClass().getResource("dtd/xwork-validator-1.0.2.dtd"));
//        setOutputValidator(new XMLOutputValidator(dtds));
        new TagLibrary(metadataProvider);
	}
	
}
